package com.kaiwukj.android.ufamily.mvp.http.entity.result;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseBean;

import java.util.List;

public class DynamicResult extends BaseBean {
    /**
     * "id": 2,
     * "userId": 2,
     * "topicId": 2,
     * "topicTitle": "hJFVw",
     * "userName": "尹灵",
     * "sysCommunityId": 2,
     * "communityName": "VTvIS",
     * "dynamicContent": "6H2Wp4WmNKeIHfWO5RSCivtHVoYyHE",
     * "images": "http://jylqn.kaiwumace.com/manhendImg.png",
     * "video": null,
     * "thumbNum": 0, //点赞数量,默认为0"
     * "commentNum": 0, //评论数量，默认为0
     * "reportedNum": 0,//被举报次数
     * "createTime": "2020-04-18 16:08:49",
     * "updateTime": "2020-04-18 16:08:49",
     * "deleted":
     * "headImg": null,
     * "concern": 0,//是否关注
     * "praise":0//是否点赞
     */


    private Integer id;
    private Integer userId;
    private Integer topicId;
    private String topicTitle;
    private String userName;
    private Integer sysCommunityId;
    private String communityName;
    private String dynamicContent;
    private String images;
    private String video;
    private Integer thumbNum;
    private Integer commentNum;
    private Integer reportedNum;
    private String createTime;
    private String updateTime;
    private String headImg;
    private Integer concern;
    private Integer praise;
    private String cityCode;
    private List<CommentResult> commentList;

    public List<CommentResult> getCommentList() {
        return commentList;
    }

    public void setCommentList(List<CommentResult> commentList) {
        this.commentList = commentList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getTopicId() {
        return topicId == null ? 0 : topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getTopicTitle() {
        return topicTitle;
    }

    public void setTopicTitle(String topicTitle) {
        this.topicTitle = topicTitle;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getSysCommunityId() {
        return sysCommunityId;
    }

    public void setSysCommunityId(Integer sysCommunityId) {
        this.sysCommunityId = sysCommunityId;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getDynamicContent() {
        return dynamicContent;
    }

    public void setDynamicContent(String dynamicContent) {
        this.dynamicContent = dynamicContent;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public Integer getThumbNum() {
        return thumbNum == null ? 0 : thumbNum;
    }

    public String getThumbNumText() {
        return getThumbNum() == 0 ? "点赞" : String.valueOf(getThumbNum());
    }

    public void setThumbNum(Integer thumbNum) {
        this.thumbNum = thumbNum;
    }

    public Integer getCommentNum() {
        return commentNum == null ? 0 : commentNum;
    }

    public String getCommentNumText() {
        return getCommentNum() == 0 ? "评论" : String.valueOf(getCommentNum());
    }

    public void setCommentNum(Integer commentNum) {
        this.commentNum = commentNum;
    }

    public Integer getReportedNum() {
        return reportedNum == null ? 0 : reportedNum;
    }

    public void setReportedNum(Integer reportedNum) {
        this.reportedNum = reportedNum;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public Integer getConcern() {
        return concern == null ? 0 : concern;
    }

    public void setConcern(Integer concern) {
        this.concern = concern;
    }

    public Integer getPraise() {
        return praise == null ? 0 : praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public void attention(boolean attention) {
        setConcern(attention ? 1 : 0);
    }

    public void praise(boolean praise) {
        setPraise(praise ? 1 : 0);
    }

    public boolean isAttention() {
        return concern != null && concern == 1;
    }

    public boolean isPraise() {
        return praise != null && praise == 1;
    }
}
